<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>

<script>
import Reject from "./../reject/index";

export default {
  mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.Edit],
  components: {
    SelectImage: async () =>
      Vue.extend(await Vue.prototype.$vFN.Components.Base.SelectImage()),
  },
  data() {
    return {
      appWindow: window,
      form: {
        // 提现姓名
        // real_name: "",
        // // 提现方式
        // type: "",
        // // 提现状态
        // status: 1,
        // validity_type: 1
        // back_card: "",

      },
      loading: true,

    };
  },
  methods: {
    async getData() {
      let res = await this.$vFN.Http.post({
          url: "admin/withdraw/detail",
          data: {
              id: this.id
          }
      }, window)
      this.form = res.data
      this.loading = false
    },
    // 审核通过
    async payment () {
      let res = await this.$vFN.Http.post({
        url: "admin/withdraw/pay",
        data: {
          id: this.id,
          bank_card: this.form.bank_card,
          f_bank_card: this.form.f_bank_card,
          real_name: this.form.real_name,
          f_real_name: this.form.f_real_name,
          type: this.form.type,
          f_type: this.form.f_type
        },
      },window);
      if (res.success) {
        this.onSuccess();
        this.$vFN.Tools.messageSuccess("操作成功");
        this.mixinEdit_editVisible = false;
      }
    },
    // 初始化
    async init() {
      // 初始化数据
      await this.mixinEdit_editBoxInit({
        model: "form",
        id: this.id,
      });
      this.getData();
    },
    // 成功回调
    onSuccess() {},
    // 取消回调
    onCancel() {},
    // 失败回调
    onError() {},
    // 关闭窗口
    editBoxClose() {
      this.onSuccess();
    },
  },
  mounted() {
    this.init();
  },
  activated() {},
};
</script>